CSS Vertical Alignment
Quickly and easily modify the vertical alignment of inline, inline-block, inline-table, and table cell elements to enhance your web layout.
What is CSS Vertical Alignment?
CSS vertical alignment refers to the positioning of elements along the vertical axis within a container. It can be achieved using properties like vertical-align for inline or table-cell elements, and by utilizing Flexbox or Grid for block-level elements to center or align them effectively.
CSS Vertical Alignment
Change the alignment of elements with the vertical-alignment utilities. Please note that vertical-align only affects inline, inline-block, inline-table, and table cell elements.
Choose from .align-baseline, .align-top, .align-middle, .align-bottom, .align-text-bottom, and .align-text-top as needed.
To vertically center non-inline content (like <div>s and more), use our flex box utilities.
With inline elements:
baseline
top
middle
bottom
text-top
text-bottom
baseline
top
middle
bottom
text-top
text-bottom
With table cells:
| baseline | top | middle | bottom | text-top | text-bottom |
baseline
top
middle
bottom
text-top
text-bottom